home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / CIncludes / FCntl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-11-30  |  1.7 KB  |  61 lines  |  [TEXT/MPS ]

  1. /*
  2.  * FCntl.h -- faccess(), fcntl(), and open() mode flags
  3.  *
  4.  * Portions copyright American Telephone & Telegraph
  5.  * Used with permission, Apple Computer Inc. (1985, 1988)
  6.  * All rights reserved.
  7.  */
  8.  
  9. #ifndef __FCNTL__
  10. #define __FCNTL__
  11. /*
  12.  * faccess() commands
  13.  */
  14. # define F_OPEN         (('d'<<8)|00)        /* 'd' => "directory" ops */
  15. # define F_DELETE        (('d'<<8)|01)
  16. # define F_RENAME        (('d'<<8)|02)
  17.  
  18. # define F_GTABINFO     (('e'<<8)|00)        /* 'e' => "editor" ops */    
  19. # define F_STABINFO     (('e'<<8)|01)
  20. # define F_GFONTINFO    (('e'<<8)|02)
  21. # define F_SFONTINFO    (('e'<<8)|03)
  22. # define F_GPRINTREC    (('e'<<8)|04)
  23. # define F_SPRINTREC    (('e'<<8)|05)
  24. # define F_GSELINFO     (('e'<<8)|06)
  25. # define F_SSELINFO     (('e'<<8)|07)
  26. # define F_GWININFO     (('e'<<8)|08)
  27. # define F_SWININFO     (('e'<<8)|09)
  28.  
  29. /*
  30.  * Mode values accessible to open()
  31.  */
  32. # define O_RDONLY      0         /* Bits 0 and 1 are used internally */
  33. # define O_WRONLY      1         /* Values 0..2 are historical */
  34. # define O_RDWR       2
  35. # define O_APPEND    (1<<3)        /* append (writes guaranteed at the end) */
  36. # define O_RSRC     (1<<4)        /* Open the resource fork */
  37. # define O_CREAT    (1<<8)        /* Open with file create */
  38. # define O_TRUNC    (1<<9)        /* Open with truncation */
  39. # define O_EXCL     (1<<10)     /* Exclusive open */
  40. # define O_BINARY    (1<<11)     /* Open as a binary stream */
  41. # define O_USEP     (1<<12)     /* For internal use only */
  42. # define O_TMP         (1<<13)     /* For internal use only */
  43.  
  44. #ifdef __safe_link
  45. extern "C" {
  46. #endif
  47.  
  48. int faccess(char*, unsigned int, long*);
  49. int fcntl(int, unsigned int, int);
  50. int unlink(char*), open(const char*, int), close(int), creat(const char*);
  51. int read(int, char*, unsigned), write(int, const char*, unsigned);
  52. long lseek(int, long, int); 
  53.  
  54. #ifdef __safe_link
  55. }
  56. #endif
  57.  
  58. # define F_DUPFD 0       /* Duplicate fildes */
  59.  
  60. #endif __FCNTL__
  61.